﻿CREATE TABLE [jnl].[Journal] (
    [JournalId]           INT            IDENTITY (1, 1) NOT NULL,
    [EffectiveDate]       DATE           NOT NULL,
    [AccountingPeriodId]  INT            NOT NULL,
    [AdjustmentTypeId]    SMALLINT       NOT NULL,
    [JournalOwnerId]      SMALLINT       NOT NULL,
    [JournalStatusId]     SMALLINT       NOT NULL,
    [PostingCostCentreId] INT            NOT NULL,
    [ValueDate]           DATE           NOT NULL,
    [InputDate]           DATE           NOT NULL,
    [InputTime]           TIME (7)       NOT NULL,
    [InputBy]             NVARCHAR (20)  NOT NULL,
    [AuthoriseDate]       DATE           NULL,
    [AuthoriseTime]       TIME (7)       NULL,
    [AuthoriseBy]         NVARCHAR (20)  NULL,
    [ReversalDate]        DATE           NULL,
    [ReferenceJournalId]  INT            NULL,
    [JournalDescription]  NVARCHAR (200) NULL,
    [IsYearEndReversal]   BIT            NOT NULL,
    [RowChecksumMD5]      CHAR (36)      NULL,
    [RowAuditId]          INT            NULL,
    PRIMARY KEY CLUSTERED ([JournalId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

